package Domain;

import java.io.Serializable;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * MyUser: Александр
 * Date: 30.11.13
 * Time: 13:39
 * To change this template use File | Settings | File Templates.
 */
public class User implements Serializable{
    public User(){
       _name = new Name();
    }

    public enum Gender {MALE, FEMALE};

    public static class Name {
        public Name(){
            _first = new String();
            _last = new String();
        }

        private String _first, _last;


        public String getFirst() {
            return _first;
        }

        @Override
        public String toString() {
            return "Name{" +
                    "_first='" + _first + '\'' +
                    ", _last='" + _last + '\'' +
                    '}';
        }

        public String getLast() {
            return _last;
        }

        public void setFirst(String s) {
            _first = new String(s);
        }

        public void setLast(String s) {
            _last = new String(s);
        }
    }

    private Gender _gender;
    private Name _name;
    private boolean _isVerified;
    private byte[] _userImage;

    public Name getName() {
        return _name;
    }

    public boolean isVerified() {
        return _isVerified;
    }

    public Gender getGender() {
        return _gender;
    }

    public byte[] getUserImage() {
        return _userImage;
    }

    @Override
    public String toString() {
        return "MyUser{" +
                "_gender=" + _gender +
                ", _name=" + _name +
                ", _isVerified=" + _isVerified +
                ", _userImage=" + Arrays.toString(_userImage) +
                '}';
    }

    public void setName(Name n) {
        _name = n;
    }

    public void setVerified(boolean b) {
        _isVerified = b;
    }

    public void setGender(Gender g) {
        _gender = g;
    }

    public void setUserImage(byte[] b) {
        _userImage = b;
    }
}
